#ifndef __tpc116_H
#define __tpc116_H

#ifdef __cplusplus
extern "C"
{
#endif

#include "libconfig.h"
#include "main.h"

#ifdef tpc116_GLOBALS
#define tpc116_EXT
#else
#define tpc116_EXT extern
#endif
	typedef enum
	{
		TPC_V,	   //
		TPC_I,  //
		TPC_I1,  //
		TPC_I_O=1,  //+
		TPC_I_I, //-
		TPC_NC,	   //
	} TPC116_CH_t;

typedef struct
{
	s32 set;
	s32 set_l;
	s32 set_h;
} TPC116_t;
tpc116_EXT TPC116_t gTpc[3];
	void tpc116_set(TPC116_CH_t ch, s32 value); // 0123 <--> ABCD
	u16 tpc116_get(TPC116_CH_t ch);
	void tpc116_Init(void);
	void tpc116_set_dac(TPC116_CH_t ch, s32 dac);// dac


#ifdef __cplusplus
}
#endif
#endif
